3.1.45 \(\int \frac {x^2 (d+e x)}{b x+c x^2} \, dx\) [45]

Optimal. Leaf size=45 \[ \frac {(c d-b e) x}{c^2}+\frac {e x^2}{2 c}-\frac {b (c d-b e) \log (b+c x)}{c^3} \]

[Out]

(-b*e+c*d)*x/c^2+1/2*e*x^2/c-b*(-b*e+c*d)*ln(c*x+b)/c^3

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.050, Rules used = {779} \begin {gather*} -\frac {b (c d-b e) \log (b+c x)}{c^3}+\frac {x (c d-b e)}{c^2}+\frac {e x^2}{2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x^2*(d + e*x))/(b*x + c*x^2),x]

[Out]

((c*d - b*e)*x)/c^2 + (e*x^2)/(2*c) - (b*(c*d - b*e)*Log[b + c*x])/c^3

Rule 779

Int[((e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[Expand
Integrand[(e*x)^m*(f + g*x)*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, e, f, g, m}, x] && IntegerQ[p] && (
GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rubi steps

\begin {align*} \int \frac {x^2 (d+e x)}{b x+c x^2} \, dx &=\int \left (\frac {c d-b e}{c^2}+\frac {e x}{c}+\frac {b (-c d+b e)}{c^2 (b+c x)}\right ) \, dx\\ &=\frac {(c d-b e) x}{c^2}+\frac {e x^2}{2 c}-\frac {b (c d-b e) \log (b+c x)}{c^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 41, normalized size = 0.91 \begin {gather*} \frac {c x (2 c d-2 b e+c e x)+2 b (-c d+b e) \log (b+c x)}{2 c^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x^2*(d + e*x))/(b*x + c*x^2),x]

[Out]

(c*x*(2*c*d - 2*b*e + c*e*x) + 2*b*(-(c*d) + b*e)*Log[b + c*x])/(2*c^3)

________________________________________________________________________________________

Maple [A]
time = 0.50, size = 43, normalized size = 0.96

method result size
default \(-\frac {-\frac {1}{2} c e \,x^{2}+b e x -c d x}{c^{2}}+\frac {b \left (b e -c d \right ) \ln \left (c x +b \right )}{c^{3}}\) \(43\)
norman \(-\frac {\left (b e -c d \right ) x}{c^{2}}+\frac {e \,x^{2}}{2 c}+\frac {b \left (b e -c d \right ) \ln \left (c x +b \right )}{c^{3}}\) \(44\)
risch \(\frac {e \,x^{2}}{2 c}-\frac {b e x}{c^{2}}+\frac {x d}{c}+\frac {b^{2} \ln \left (c x +b \right ) e}{c^{3}}-\frac {b \ln \left (c x +b \right ) d}{c^{2}}\) \(52\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(e*x+d)/(c*x^2+b*x),x,method=_RETURNVERBOSE)

[Out]

-1/c^2*(-1/2*c*e*x^2+b*e*x-c*d*x)+b/c^3*(b*e-c*d)*ln(c*x+b)

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 49, normalized size = 1.09 \begin {gather*} \frac {c x^{2} e + 2 \, {\left (c d - b e\right )} x}{2 \, c^{2}} - \frac {{\left (b c d - b^{2} e\right )} \log \left (c x + b\right )}{c^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(e*x+d)/(c*x^2+b*x),x, algorithm="maxima")

[Out]

1/2*(c*x^2*e + 2*(c*d - b*e)*x)/c^2 - (b*c*d - b^2*e)*log(c*x + b)/c^3

________________________________________________________________________________________

Fricas [A]
time = 1.66, size = 49, normalized size = 1.09 \begin {gather*} \frac {2 \, c^{2} d x + {\left (c^{2} x^{2} - 2 \, b c x\right )} e - 2 \, {\left (b c d - b^{2} e\right )} \log \left (c x + b\right )}{2 \, c^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(e*x+d)/(c*x^2+b*x),x, algorithm="fricas")

[Out]

1/2*(2*c^2*d*x + (c^2*x^2 - 2*b*c*x)*e - 2*(b*c*d - b^2*e)*log(c*x + b))/c^3

________________________________________________________________________________________

Sympy [A]
time = 0.09, size = 37, normalized size = 0.82 \begin {gather*} \frac {b \left (b e - c d\right ) \log {\left (b + c x \right )}}{c^{3}} + x \left (- \frac {b e}{c^{2}} + \frac {d}{c}\right ) + \frac {e x^{2}}{2 c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(e*x+d)/(c*x**2+b*x),x)

[Out]

b*(b*e - c*d)*log(b + c*x)/c**3 + x*(-b*e/c**2 + d/c) + e*x**2/(2*c)

________________________________________________________________________________________

Giac [A]
time = 0.93, size = 49, normalized size = 1.09 \begin {gather*} \frac {c x^{2} e + 2 \, c d x - 2 \, b x e}{2 \, c^{2}} - \frac {{\left (b c d - b^{2} e\right )} \log \left ({\left | c x + b \right |}\right )}{c^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(e*x+d)/(c*x^2+b*x),x, algorithm="giac")

[Out]

1/2*(c*x^2*e + 2*c*d*x - 2*b*x*e)/c^2 - (b*c*d - b^2*e)*log(abs(c*x + b))/c^3

________________________________________________________________________________________

Mupad [B]
time = 1.02, size = 46, normalized size = 1.02 \begin {gather*} x\,\left (\frac {d}{c}-\frac {b\,e}{c^2}\right )+\frac {e\,x^2}{2\,c}+\frac {\ln \left (b+c\,x\right )\,\left (b^2\,e-b\,c\,d\right )}{c^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2*(d + e*x))/(b*x + c*x^2),x)

[Out]

x*(d/c - (b*e)/c^2) + (e*x^2)/(2*c) + (log(b + c*x)*(b^2*e - b*c*d))/c^3

________________________________________________________________________________________